<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <!-- Import style -->
    <link rel="stylesheet" href="//unpkg.com/element-plus/dist/index.css" />
    <!-- Import Vue 3 -->
    <script src="./vue.js"></script>
    <!-- Import component library -->
    <script src="//unpkg.com/element-plus"></script>
  </head>
  <body>
    <div id="app">
      <el-button>按钮</el-button>
      <el-button>按钮</el-button>
      <el-button>按钮</el-button>
      <el-button>按钮</el-button>
      <el-button>按钮</el-button>
      <el-button>按钮</el-button>
      <el-rate v-model="res"></el-rate>
      <el-rate v-model="res"></el-rate>
      <el-rate v-model="res"></el-rate>
      <el-rate v-model="res"></el-rate>
      <el-rate v-model="res"></el-rate>
      <h2>{{res}}</h2>
    </div>
  </body>
  <script>
    // 组件式开发   低耦合  高内聚
    // 类比函数   隔离作用域、代码复用
    // 提升复用性 ？ 传参的思想
    let app = Vue.createApp({
      data() {
        // 数据
        return {
          res: 2,
        };
      },
    });
    app.use(ElementPlus); //注册组件
    app = app.mount("#app");
  </script>
</html>
